<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>tango.text.stream.QuoteIterator</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "tango.text.stream.QuoteIterator";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/tango.text.stream.QuoteIterator.html" class="symbol">tango.text.stream.QuoteIterator</a></h1>
  
<p class="sec_header">License:</p>BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a>
<p class="sec_header">Version:</p>Initial release: January 2006
<p class="sec_header">Author:</p>Kris
<dl>
<dt class="decl">class <a class="symbol _class" name="QuoteIterator" href="./htmlsrc/tango.text.stream.QuoteIterator.html#L42" kind="class" beg="42" end="115">QuoteIterator</a><span class="tparams">(T)</span> : StreamIterator!(T); <a title="Permalink to this symbol" href="#QuoteIterator" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.stream.QuoteIterator.html#L42">#</a></dt>
<dd class="ddef">
<div class="summary">Iterate across a set of text patterns.</div>
Each pattern is exposed to the client as a slice of the original
        content, where the slice is transient. If you need to retain the
        exposed content, then you should .dup it appropriately. 
<p class="bl"/>
        These iterators are based upon the IBuffer construct, and can
        thus be used in conjunction with other Iterators and/or Reader
        instances upon a common buffer ~ each will stay in lockstep via
        state maintained within the IBuffer.
<p class="bl"/>
        The content exposed via an iterator is supposed to be entirely
        read-only. All current iterators abide by this rule, but it is
        possible a user could mutate the content through a get() slice.
        To enforce the desired read-only aspect, the code would have to 
        introduce redundant copying or the compiler would have to support 
        read-only arrays.
<p class="bl"/>
        See LineIterator, SimpleIterator, RegexIterator, QuotedIterator.
<dl>
<dt class="decl"><a class="symbol _ctor" name="QuoteIterator.this" href="./htmlsrc/tango.text.stream.QuoteIterator.html#L76" kind="ctor" beg="76" end="80">this</a><span class="params">(T[] <em>delim</em>, InputStream <em>stream</em> = null)</span>; <a title="Permalink to this symbol" href="#QuoteIterator.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.stream.QuoteIterator.html#L76">#</a></dt>
<dd class="ddef">
<div class="summary">Construct an uninitialized iterator. For example:
                <pre class="d_code">
<span class="k">auto</span> <span class="i">lines</span> = <span class="k">new</span> <span class="i">LineIterator</span>!(<span class="k">char</span>);

<span class="k">void</span> <span class="i">somefunc</span> (<span class="i">IBuffer</span> <span class="i">buffer</span>)
{
        <span class="k">foreach</span> (<span class="i">line</span>; <span class="i">lines</span>.<span class="i">set</span>(<span class="i">buffer</span>))
                 <span class="i">Cout</span> (<span class="i">line</span>).<span class="i">newline</span>;
}
</pre></div>
Construct a streaming iterator upon a buffer:
                <pre class="d_code">
<span class="k">void</span> <span class="i">somefunc</span> (<span class="i">IBuffer</span> <span class="i">buffer</span>)
{
        <span class="k">foreach</span> (<span class="i">line</span>; <span class="k">new</span> <span class="i">LineIterator</span>!(<span class="k">char</span>) (<span class="i">buffer</span>))
                 <span class="i">Cout</span> (<span class="i">line</span>).<span class="i">newline</span>;
}
</pre>
                
                Construct a streaming iterator upon a conduit:
                <pre class="d_code">
<span class="k">foreach</span> (<span class="i">line</span>; <span class="k">new</span> <span class="i">LineIterator</span>!(<span class="k">char</span>) (<span class="k">new</span> <span class="i">FileConduit</span> (<span class="sl">"myfile"</span>)))
         <span class="i">Cout</span> (<span class="i">line</span>).<span class="i">newline</span>;
</pre></dd>
<dt class="decl">uint <a class="symbol _function" name="QuoteIterator.pair" href="./htmlsrc/tango.text.stream.QuoteIterator.html#L86" kind="function" beg="86" end="93">pair</a><span class="params">(T[] <em>content</em>, T <em>quote</em>)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#QuoteIterator.pair" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.stream.QuoteIterator.html#L86">#</a></dt>
<dd class="ddef">
<div class="summary"></div></dd>
<dt class="decl">uint <a class="symbol _function" name="QuoteIterator.scan" href="./htmlsrc/tango.text.stream.QuoteIterator.html#L99" kind="function" beg="99" end="114">scan</a><span class="params">(void[] <em>data</em>)</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#QuoteIterator.scan" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.stream.QuoteIterator.html#L99">#</a></dt>
<dd class="ddef">
<div class="summary"></div></dd></dl></dd></dl>
</div>
<div id="footer">
  <p>Copyright (c) 2004 Kris Bell. All rights reserved</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 04:04:42 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>